package
{
	import Control.BroadMessageCenter;
	import Control.LoaderAssetsEvent;
	import Control.tools.LoadAssets;
	
	import View.UICanvas;
	import View.UIComponent.UIButton;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	import flash.system.ApplicationDomain;
	import flash.utils.getDefinitionByName;
	
	
	public class App extends Sprite
	{
		public var canvas:UICanvas;
		public function App()
		{
			BroadMessageCenter.getInstance().sendEvent.addEventListener(LoaderAssetsEvent.loadAssets_complete,onAssetsLoadComplete);
			LoadAssets.getInstance().loadAssetsByUrl("assets/loadassets.swf");
		}
		public function onAssetsLoadComplete(e:LoaderAssetsEvent):void
		{
			canvas=new UICanvas();
			canvas.createButton();
			addChild(canvas);
			MyApplication.getInstance().startUp(this);
		}
	}
}